﻿
@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>员工管理</title>
    <link href="~/Content/bootstrap-3.3.7-dist/css/bootstrap.min.css" rel="stylesheet" />
    @*CSS样式(包含默认皮肤样式)*@

    <link href="~/Content/jquery.bsgrid-1.37/builds/merged/bsgrid.all.min.css" rel="stylesheet" />
    <link href="~/Content/Tree/jsTree/style.min.css" rel="stylesheet" />
    @*自定义样式*@
    <style type="text/css">
        .container {
            width: 100%;
            padding: 0;
        }

        .panel-heading {
            font-size: 16px;
            text-align: center;
        }

        .panel-body {
            padding-top: 0;
        }

            .panel-body label {
                font-weight: normal;
                font-size: 16px;
            }

        .setPadding {
            border: 1px solid #eee;
            padding: 5px 0 5px 10px;
        }

            .setPadding button {
                padding: 4px 6px;
                font-size: 12px;
            }

        .form-horizontal label {
            font-size: 12px;
        }

        .form-horizontal select, .form-horizontal input {
            height: 26px;
            padding: 0;
        }

        .reset {
            padding: 0;
        }

        .examineeInfor {
            border: 1px solid #eee;
            padding: 0;
        }

        .h5 {
            margin: 0;
            background: #eef;
            padding: 6px 10px;
        }

        .examineeInfor th, .examineeInfor td {
            font-weight: normal;
            text-align: center;
        }

        #examineeInfor th {
            padding: 4px 8px;
        }

        .modal-header {
            padding: 6px 5px;
            border-bottom: none;
            background: #337ab7;
            text-align: center;
            color: #fff;
        }

        .modal-content {
            padding: 6px;
        }

        .modal-body {
            border: 1px solid #ddd;
            padding: 0 25px;
        }

        .modal-content label {
            font-weight: normal;
            font-size: 12px;
        }

        .img-box {
            border: 1px solid #eee;
            padding: 10px;
        }

        .modal-dialog {
            width: 400px;
        }

        .modal .form-group {
            margin-bottom: 0;
            margin-top: 2px;
        }

        .form-group input {
            height: 26px;
        }

        .setSex {
            position: relative;
            top: -10px;
            left: 2px;
        }

        .text-center {
            color: red;
        }
    </style>
</head>
<body>
    @*页面*@
    <div class="panel">
        <div class="panel-heading">帅气的蓝色</div>
        <div class="panel-body">
            @*搜索栏按钮栏*@
            <div class="row">
                <div class="col-lg-2 col-md-2 col-sm-2">
                    <div id="A"></div>
                </div>
                <div class="row setPadding" style="margin-left: -13px">
                    @*按钮*@
                    <div class="col-lg-10 col-md-5 col-sm-5" style="float:right">
                        <button class="btn btn-group" type="button" id="close">关闭</button>
                        <button class="btn btn-group" type="button" id="refresh">刷新</button>
                        <button class="btn btn-group" type="button" id="add">新增</button>
                        <button class="btn btn-group" type="button" id="redact">编辑</button>
                        <button class="btn btn-group" type="button" id="delete" @*onclick="doDelete()"*@>删除</button>
                        <button class="btn btn-group" type="button" id="demand">查询</button>
                        <button class="btn btn-group" type="button" id="Stamp" onclick="Stamp()">打印</button>
                        <button class="btn btn-group" type="button" id="Derive">导出</button>
                    </div>

                    @*表格数据绑定*@
                    <div class="col-lg-10 col-md-5 col-sm-5" style="float:right">
                        <table id="Tiss" style="width:100%">
                            <tr>
                                <th w_check="true" w_index="StaffID" id="StaffID"></th>
                                <th w_num="total_line">NO.</th>
                                <th w_index="StaffName">员工姓名</th>
                                <th w_index="StaffNumber">员工编号</th>
                                <th w_index="State">状态</th>
                                <th w_index="Duty">职责</th>
                                <th w_index="Sex">性别</th>
                                <th w_index="ChineseName">所属组织</th>
                                <th w_index="CultureLevel">文化程度</th>
                                <th w_index="JoinJob">入职日期</th>
                                <th w_render="WhetherStart">是否启用</th>
                                @*<th w_index="WhetherStart" w_hidden="true">入职日期</th>*@
                                @*<th w_check="true" w_index="WhetherStart">是否启用</th>*@
                            </tr>
                        </table>
                    </div>
                </div>
            </div>
        </div>
        @*新增考生模态窗体*@
        <div class="modal  bs-example-modal-sm" id="modInsertExaminee">
            <div class="modal-dialog">
                <div class="modal-content">
                    @*模态框头部*@
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal">
                            <span aria-hidden="true">&times;</span>
                            <span class="sr-only">Close</span>
                        </button>
                        <h5 class="modal-title">蓝色的帅气</h5>
                    </div>
                    @*新增模态框内容*@
                    <div class="modal-body">
                        <form class="form-horizontal" role="form" id="formInsertExaminee" action="InserStaffControl" method="post">
                            <div class="form-group">


                                <div class="col-lg-3 col-md-3 col-sm-3 text-right">
                                    <label class="control-label">员工姓名:</label>
                                </div>
                                <div class="col-lg-8 col-md-8 col-sm-8 reset">
                                    <input type="text" class="form-control" id="StaffName" name="StaffName" autocomplete="off" />
                                    @*<lable id="StudentIDNumlength" style="font:12px;color:#0094ff;">00位</lable>*@
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-lg-3 col-md-3 col-sm-3 text-right">
                                    <label class="control-label">员工编号:</label>
                                </div>
                                <div class="col-lg-8 col-md-8 col-sm-8 reset">
                                    <input type="text" class="form-control" id="StaffNumber" name="StaffNumber" />
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-lg-3 col-md-3 col-sm-3 text-right">
                                    <label class="control-label">状态：</label>
                                </div>
                                <div class="col-lg-8 col-md-8 col-sm-8 reset">
                                    <select type="text" class="form-control" id="State" name="State">
                                        <option value="0">------请选择-----</option>
                                        <option value="在职">在职</option>
                                        <option value="离职">离职</option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-lg-3 col-md-3 col-sm-3 text-right">
                                    <label class="control-label">公司:</label>
                                </div>
                                <div class="col-lg-8 col-md-8 col-sm-8 reset">
                                    <select type="text" class="form-control" id="MessageID" name="MessageID"></select>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-lg-3 col-md-3 col-sm-3 text-right">
                                    <label class="control-label">部门:</label>
                                </div>
                                <div class="col-lg-8 col-md-8 col-sm-8 reset">
                                    <select type="text" class="form-control" id="DepartmentID" name="DepartmentID"></select>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-lg-3 col-md-3 col-sm-3 text-right">
                                    <label class="control-label">职责:</label>
                                </div>
                                <div class="col-lg-8 col-md-8 col-sm-8 reset">
                                    <input type="text" class="form-control" id="Duty" name="Duty" />
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-lg-3 col-md-3 col-sm-3 text-right">
                                    <label class="control-label">性别:</label>
                                </div>
                                <div class="col-lg-8 col-md-8 col-sm-8 reset">
                                    <select type="text" class="form-control" id="Sex" name="Sex">
                                        <option value="">--请选择---------</option>
                                        <option value="男">男</option>
                                        <option value="女">女</option>
                                    </select>
                                </div>
                            </div>

                            <div class="form-group">
                                <div class="col-lg-3 col-md-3 col-sm-3 text-right">
                                    <label class="control-label">文化程度:</label>
                                </div>
                                <div class="col-lg-8 col-md-8 col-sm-8 reset">
                                    <select type="text" class="form-control" id="CultureLevel" name="CultureLevel">
                                        <option value="">------------请选择--</option>
                                        <option value="半文盲">半文盲</option>
                                        <option value="文盲">文盲</option>
                                        <option value="小学">小学</option>
                                        <option value="初中">初中</option>
                                        <option value="高中">高中</option>
                                        <option value="技工学校">技工学校</option>
                                        <option value="中等技术学校">中等技术学校</option>
                                        <option value="中等专业学校">中等专业学校</option>
                                        <option value="大学本科">大学本科</option>
                                        <option value="研究生">研究生</option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-lg-3 col-md-3 col-sm-3 text-right">
                                    <label class="control-label">入职日期:</label>
                                </div>
                                <div class="col-lg-8 col-md-8 col-sm-8 reset">
                                    <input type="date" class="form-control" id="JoinJob" name="JoinJob">
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-lg-3 col-md-3 col-sm-3 text-right">
                                    <label class="control-label">是否启用:</label>
                                </div>
                                <div class="col-lg-8 col-md-8 col-sm-8 reset">
                                    <input type="checkbox" class="form-control" id="WhetherStart" name="WhetherStart" />
                                </div>
                            </div>
                            <div class="form-group" style="padding:10px;">
                                <div class="col-lg-8 col-md-8 col-sm-8 pull-right">
                                    <button class="btn btn-primary" type="reset" id="l">查询</button>
                                    <button class="btn btn-primary" type="reset" id="ll">新增</button>
                                    <button class="btn btn-primary" type="reset" id="lll">重置</button>
                                    <button class="btn btn-primary" type="reset" id="llll">修改</button>
                                    <button class="btn btn-primary" type="button" id="lllll">保存</button>
                                    <button class="btn btn-danger" data-dismiss="modal">关闭</button>
                                </div>
                            </div>
                            <div class="col-lg-3 col-md-3 col-sm-3 text-right">
                                <label class="control-label"></label>
                            </div>
                            <div class="col-lg-8 col-md-8 col-sm-8 reset">
                                <input type="hidden" class="form-control" id="StaffID" name="StaffID" autocomplete="off" />

                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>

    </div>

    @*外部js引用*@
    <script src="~/Content/Tree/jquery.min.js"></script>
    <script src="~/Content/bootstrap-3.3.7-dist/js/jquery-2.0.3.min.js"></script>
    <script src="~/Content/bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>@*jquery.bsgrid*@
    <script src="~/Content/jquery.bsgrid-1.37/builds/js/lang/grid.zh-CN.min.js"></script>
    <script src="~/Content/jquery.bsgrid-1.37/builds/merged/bsgrid.all.min.js"></script>@*查询表格*@
    <script src="~/Content/layer/layer.js"></script>@*对话框*@
    <script src="~/Content/js/customfunction.js"></script>@*下拉框数据绑定、表单数据回填*@
    <script src="~/Content/js/combobox.js"></script>   @*点击选中行*@
    <script src="~/Content/js/jquery.form.js"></script>@*提交表单*@
    <script src="~/Content/Tree/jstree.min.js"></script>
    <script src="~/Content/Tree/Tree.js"></script>
    <script>
        var qqq;
        Tree("#A", "/PPAP/SystemAAM/Tree")
        appendOption("MessageID", "/Main/Message");
        appendOption("DepartmentID", "/Main/Department");

        $(function () {
            //初始化表格数据
            qqq = $.fn.bsgrid.init("Tiss", {
                url: "SelectStaffControl",
                autoLoad: true,
                pageSizeSelect: true,//分页大小选择下拉框
                pageSize: 7,//初始化每一页数据条数
                stripeRows: true,//隔行换色
                rowHoverColor: true,//鼠标滑过变色
                pagingLittleToolbar: true,//精简的图标按钮分页工具条
                displayBlankRows: false,//不显示空白行
                event: {
                    //当前行事件
                    customRowEvents: {
                        click: function (record, rowIndex, trObj, options) {
                            //调用行点击事件
                            Check("#Tiss tr", rowIndex + 1);
                        }
                    }
                }
            });
        });
        function Tree1(MessageID) {
            tttt.search({ MessageID: MessageID })
        }
        //*************************
        $("#close").click(function () {//关闭
            window.history.go(-1);
        });
        $("#refresh").click(function () {
            location.reload();//刷新
        });
        ///*****************************条件查询******************************
        $("#demand").click(function () {//查询弹出模态框
            $("#modInsertExaminee").modal("show");
            $("#l").css("display", "block");
            //  隐藏按钮
            $("#ll").css("display", "none");//新增
            $("#lll").css("display", "none");//重置
            $("#llll").css("display", "none");//修改
            $("#lllll").css("display", "none");//保存
            $("#l").click(function () {
                $("#modInsertExaminee").modal("hide");
            });
            ////多条件查询
            $("#l").click(function () {//获取文本框信息
                var MessageID = $("#MessageID").val();
                var StaffName = $("#StaffName").val();//  员工姓名
                var StaffNumber = $("#StaffNumber").val();// /员工编号
                var State = $("#State").val();//  /状态
                var Duty = $("#Duty").val();///职责
                var Sex = $("#Sex").val();// /性别CultureLev
                var ChineseName = $("#ChineseName").val();///所属组织
                var CultureLevel = $("#CultureLevel").val();///文化程度
                var JoinJob = $("#JoinJob").val();///入职日期s
                var WhetherStart = $("#WhetherStart").prop('checked');// /是否启用
                if (StaffName == undefined) {
                    StaffName = "";
                }
                if (StaffNumber == undefined) {
                    StaffNumber = "";
                }
                if (State == undefined) {
                    State = "";
                }
                if (Duty == undefined) {
                    Duty = "";
                }
                if (Sex == undefined) {
                    Sex = "";
                }
                if (ChineseName == undefined) {
                    ChineseName = "";
                }
                if (CultureLevel == undefined) {
                    CultureLevel = "";
                }
                if (JoinJob == undefined) {
                    JoinJob = "";
                }
                if (WhetherStart == undefined) {
                    WhetherStart = "";
                }
                qqq.search({ StaffName: StaffName, StaffNumber: StaffNumber, State: State, Duty: Duty, Sex: Sex, ChineseName: ChineseName, CultureLevel: CultureLevel, JoinJob: JoinJob, WhetherStart: WhetherStart });
            });
        });

        //是否启用
        function WhetherStart(record) {
            var WhetherStart = record.WhetherStart;
            if (WhetherStart) {
                return '<span style ="color:blue">√</span>';
            } else {
                return '<span style ="color:red">×</span>';
            }
        }
        //   **********************************新增**********************************************

        $("#add").click(function () {  //新增弹出框
            $("#modInsertExaminee").modal("show");
            $("#lllll").css("display", "block");
            //隐藏

            $("#l").css("display", "none");//查询
            $("#ll").css("display", "none");//新增
            $("#lll").css("display", "none");//重置
            $("#llll").css("display", "none");//修该
        });

        $("#MessageID").change(function () {
            var aa = $("#MessageID").val();
            appendOption("DepartmentID", "/Main/Department?MessageID=" + aa)
        });
        $("#lllll").click(function () {
            var MessageID = $("#modInsertExaminee [name='MessageID']").val();
            var DepartmentID = $("#modInsertExaminee  [name='DepartmentID']").val();
            var StaffName = $('#modInsertExaminee [name="StaffName"]').val();//  员工姓名
            var StaffNumber = $("#modInsertExaminee [name ='StaffNumber']").val();// /员工编号
            var State = $("#modInsertExaminee [name ='State']").val();//状态
            var Duty = $("#modInsertExaminee [name = 'Duty']").val();///职责
            var Sex = $("#modInsertExaminee [name = 'Sex']").val();// /性别
            var CultureLevel = $("#modInsertExaminee [ name ='CultureLevel']").val();///文化程度
            var JoinJob = $("#modInsertExaminee [name = 'JoinJob']").val();///入职日期
            var WhetherStart = $("#modInsertExaminee [ name ='WhetherStart']").prop('checked');// /是否启用
            if (MessageID > 0 && DepartmentID > 0 && StaffName != "" && StaffNumber != "" && State != "" && Duty != "" && Sex != "" && CultureLevel != "" && JoinJob != "") {
                var layerIndex = layer.load(0);
                //ajaxSubmit()提交表单:我们直接通过form提交的话,提交后当前页面跳转到form的action所指向的页面。
                //然而，很多时候我们并不希望提交表单后页面跳转，那么，我们就可以使用ajaxSubmit(obj)来提交数据
                //ajaxSubmit(obj)方法是jQuery的一个插件jquery.form.js里面的方法，所以使用此方法需要先引入这个插件
                $("#formInsertExaminee").ajaxSubmit(function (msg) {
                    //关闭加载层
                    layer.close(layerIndex);
                    //关闭模态框
                    $("#modInsertExaminee").modal("hide");
                    if (msg == "success") {
                        //提示信息
                        layer.msg("录入成功！", { icon: 1, title: '提示' });
                        //刷新页面
                        location.reload();//刷新
                    } else {
                        layer.alert(msg, { icon: 0, title: '提示' });
                    }
                });
            }
            else {
                layer.alert('请填写完整信息', { icon: 0, title: '提示' });
            }
        });

        ////***********************修改***********************************
        $("#redact").click(function () {
            //隐藏按钮
            $("#l").css("display", "none");//查询
            $("#ll").css("display", "none");//新增
            $("#lllll").css("display", "none");//保存
            //显示按钮
            $("#lll").css("display", "block");//重置
            $("#llll").css("display", "block");//修改
            $("#formInsertExaminee").attr("action", "/PPAP/StaffControl/UpdateStaffControl");
            var Check = $("#Tiss input:checked");
            if (Check.length == 0) {
                layer.msg("请选择一条信息", { icon: 0, });
            }
            if (Check.length > 1) {
                layer.msg("只能选择一条信息", { icon: 0 });
            }
            if (Check.length == 1) {
                $.post("/PPAP/StaffControl/SelectStaffControl?A=" + 1 + "&StaffID=" + Check[0].value, function (data) {
                    setTimeout(function myfunction() {
                        loadDatatoForm("modInsertExaminee", data[0]);
                        $("#modInsertExaminee").modal('show');
                    }, 100)
                    appendOption("DepartmentID", "/Main/Department?MessageID=" + data[0].MessageID)
                });
            }
        });
        $("#llll").click(function () {
            var StaffID = $("modInsertExaminee [name ='StaffID']").val();
            var MessageID = $("#modInsertExaminee [name='MessageID']").val();
            var DepartmentID = $("#modInsertExaminee  [name='DepartmentID']").val();
            var StaffName = $('#modInsertExaminee [name="StaffName"]').val();//  员工姓名
            var StaffNumber = $("#modInsertExaminee [name ='StaffNumber']").val();// /员工编号
            var State = $("#modInsertExaminee [name ='State']").val();//状态
            var Duty = $("#modInsertExaminee [name = 'Duty']").val();///职责
            var Sex = $("#modInsertExaminee [name = 'Sex']").val();// /性别
            var CultureLevel = $("#modInsertExaminee [ name ='CultureLevel']").val();///文化程度
            var JoinJob = $("#modInsertExaminee [name = 'JoinJob']").val();///入职日期
            var WhetherStart = $("#modInsertExaminee [ name ='WhetherStart']").prop('checked');// /是否启用
            if (MessageID > 0 && DepartmentID > 0 && StaffName != "" && StaffNumber != "" && State != "" && Duty != "" && Sex != "" && CultureLevel != "" && JoinJob != "") {
                var layerIndex = layer.load(0);
                //ajaxSubmit()提交表单:我们直接通过form提交的话,提交后当前页面跳转到form的action所指向的页面。
                //然而，很多时候我们并不希望提交表单后页面跳转，那么，我们就可以使用ajaxSubmit(obj)来提交数据
                //ajaxSubmit(obj)方法是jQuery的一个插件jquery.form.js里面的方法，所以使用此方法需要先引入这个插件
                $("#formInsertExaminee").ajaxSubmit(function (msg) {
                    //关闭加载层
                    layer.close(layerIndex);
                    //关闭模态框
                    $("#modInsertExaminee").modal("hide");
                    if (msg == "success") {
                        //提示信息
                        layer.msg("修改成功！", { icon: 1, title: '提示' });
                        //刷新页面
                        location.reload();//刷新
                    } else {
                        layer.alert(msg, { icon: 0, title: '提示' });
                    }
                });
            }
            else {
                layer.alert('请填写完整信息', { icon: 0, title: '提示' });
            }
        });
        //**************************删除**************
        $("#delete").click(function () {
            //获取选中行
            var check = $("#Tiss input:checked");
            //声明一个变量记录删除数据的条数
            //var ReturnLength = 0;
            if (check.length > 0) {
                layer.confirm("确定要删除吗？", {
                    icon: 3,
                    btn: ['确定', '取消'],
                    offset: "50px"
                }, function (layerIndex) {
                    //关闭提示框
                    layer.close(layerIndex);
                    for (var i = 0; i < check.length; i++) {
                        var id = check[i].value;
                        $.ajax({
                            url: "DeleteStaffControl?StaffID=" + id,
                            type: "get",//数据传输通道类型
                            async: false,
                            dataType: "json",
                            success: function (data) {
                                if (data) {

                                    location.reload();
                                } else {
                                    layer.msg(data, { icon: 0, title: "提示" });
                                }

                            }
                        });
                    }

                })
            }
            else {
                //引用第三方对话框。
                layer.alert("请选择要删除的信息", { icon: 0, title: '提示' });
            }
        });
        //*********************打印**********************
        $("#Stamp").click(function () {
            var StaffID = $("modInsertExaminee [name ='StaffID']").val();
            var StaffName = $('#modInsertExaminee [name="StaffName"]').val();//  员工姓名
            var StaffNumber = $("#modInsertExaminee [name ='StaffNumber']").val();// /员工编号
            var State = $("#modInsertExaminee [name ='State']").val();//状态
            var Duty = $("#modInsertExaminee [name = 'Duty']").val();///职责
            var Sex = $("#modInsertExaminee [name = 'Sex']").val();// /性别
            var CultureLevel = $("#modInsertExaminee [ name ='CultureLevel']").val();///文化程度
            var JoinJob = $("#modInsertExaminee [name = 'JoinJob']").val();///入职日期
            var WhetherStart = $("#modInsertExaminee [ name ='WhetherStart']").prop('checked');// /是否启用

            if (StaffName == undefined || StaffName == null) {
                StaffName = "";
            }
            if (StaffNumber == undefined || StaffNumber == null) {
                StaffNumber = "";
            }
            if (State == undefined || State == null) {
                State = "";
            }
            if (Duty == undefined || Duty == null) {
                Duty = '';
            }
            if (Sex == undefined || Sex == null) {
                Sex = '';
            }
            if (CultureLevel == undefined || CultureLevel == null) {
                CultureLevel = '';
            }
            if (JoinJob == undefined || JoinJob == null) {
                JoinJob = '';
            }
            if (WhetherStart == undefined || WhetherStart == null) {
                WhetherStart = '';
            }
            var str = "StaffName" + StaffName + "StaffNumber" + StaffNumber + "State" + State + "Duty" + Duty + "Sex" + Sex + "CultureLevel" + CultureLevel + "JoinJob" + JoinJob + "WhetherStart" + WhetherStart
            if (qqq.getTotalRows() > 0) {
                layer.confirm("确定要打印当前数据吗？", {
                    icon: 3,
                    btn: ["确定", "取消"]

                }, function (layerIndex) {
                    layer.close(layerIndex)
                    window.open("StampStaffControl?" + str);

                });
            } else {
                layer.alert("请先查询出考生，预览是否是需要打印的数据", { icon: 0, title: '提示' });
            }
        });
        //*************************导出******************************

        $("#Derive").click(function () {
            var StaffID = $("modInsertExaminee [name ='StaffID']").val();
            var StaffName = $('#modInsertExaminee [name="StaffName"]').val();//  员工姓名
            var StaffNumber = $("#modInsertExaminee [name ='StaffNumber']").val();// /员工编号
            var State = $("#modInsertExaminee [name ='State']").val();//状态
            var Duty = $("#modInsertExaminee [name = 'Duty']").val();///职责
            var Sex = $("#modInsertExaminee [name = 'Sex']").val();// /性别
            var CultureLevel = $("#modInsertExaminee [ name ='CultureLevel']").val();///文化程度
            var JoinJob = $("#modInsertExaminee [name = 'JoinJob']").val();///入职日期
            var WhetherStart = $("#modInsertExaminee [ name ='WhetherStart']").prop('checked');// /是否启用

            if (StaffName == undefined || StaffName == null) {
                StaffName = "";
            }
            if (StaffNumber == undefined || StaffNumber == null) {
                StaffNumber = "";
            }
            if (State == undefined || State == null) {
                State = "";
            }
            if (Duty == undefined || Duty == null) {
                Duty = '';
            }
            if (Sex == undefined || Sex == null) {
                Sex = '';
            }
            if (CultureLevel == undefined || CultureLevel == null) {
                CultureLevel = '';
            }
            if (JoinJob == undefined || JoinJob == null) {
                JoinJob = '';
            }
            if (WhetherStart == undefined || WhetherStart == null) {
                WhetherStart = '';
            }
            var str = "StaffName" + StaffName + "StaffNumber" + StaffNumber + "State" + State + "Duty" + Duty + "Sex" + Sex + "CultureLevel" + CultureLevel + "JoinJob" + JoinJob + "WhetherStart" + WhetherStart
            if (qqq.getTotalRows() > 0) {
                layer.confirm("确定要导出当前数据吗？", {
                    icon: 3,
                    btn: ["确定", "取消"]

                }, function (layerIndex) {
                    layer.close(layerIndex)
                    window.open("DeriveStaffControl?" + str);

                });
            } else {
                layer.alert("请先查询出考生，预览是否是需要导出的数据", { icon: 0, title: '提示' });
            }
        });

    </script>
</body>
</html>
